package module_five.task03test;

import module_five.task03.ClientInitClose;
import module_five.task03.ClientModel.ClientStudentManager;
import module_five.task03.ClientScanner;
import module_five.task03.ClientView;

import java.io.IOException;

public class ClientTest {

    public static void main(String[] args) {

        ClientInitClose cic = null;
        try {

            cic = new ClientInitClose();
            cic.clientInit();

            ClientView cv = new ClientView(cic, new ClientStudentManager());
            cv.clientMainPage();
        } catch (IOException | ClassNotFoundException e) {
            e.printStackTrace();
        } finally {
            if (null != cic) {
                try {
                    cic.clientClose();
                    ClientScanner.closeScanner();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}
